package com.example.lbstest.impl;

import com.example.lbstest.mapper.StudentMapper;
import com.example.lbstest.pojo.Student;
import com.example.lbstest.service.StudentMapperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentMapperServiceImpl implements StudentMapperService {

    @Autowired
    StudentMapper studentMapper;

    @Override
    public List<Student> selectPreStudent() {
        List<Student> students = studentMapper.selectPreStudent();

        return students;
    }

    @Override
    public Student login(String number, String password) {
        Student student = studentMapper.login(number, password);
        return student;
    }

    @Override
    public List<Student> selectStudentList(String id) {
        return studentMapper.selectStudentList(id);
    }

    @Override
    public int changePassword(String number, String password) {
        return studentMapper.changePassword(number,password);
    }

    @Override
    public Student selectOneStudent(String student_id) {
        return studentMapper.selectOneStudent(student_id);
    }
}
